package org.colafries.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.colafries.common.enums.DataModelTypeEnum;

import java.time.LocalDateTime;

/**
 * @author colafries
 * @version v1.0
 * @ClassName Model
 * @Description
 * @date Created in 2024/3/15
 **/
@Data
@TableName("t_data_model")
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class DataModel {
    /**
     * 模型id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    /**
     * 数据模型唯一值
     */
    @TableField("code")
    private String code;
    /**
     * 数据源id
     */
    @TableField("db_id")
    private Integer databaseId;
    /**
     * 模型名称
     */
    @TableField("model_name")
    private String modelName;
    /**
     * 模型标签
     */
    @TableField("model_label")
    private String modelLabel;
    /**
     * 模型描述
     */
    @TableField("model_desc")
    private String modelDesc;
    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 修改人
     */
    @TableField("update_user")
    private String updateUser;
}
